package exception.demo1;

public class TryCatchDemo {
    public static void main(String[] args) {
        System.out.println("程序开始");
        try {
            String line="";
            System.out.println(line.charAt(0));
        }catch (Exception e){
            System.out.println("发现了一个异常并已解决");
        }
        System.out.println("程序结束");
    }
}
